<?php
namespace app\index\controller;
use app\common\lib\Sms;
use think\Controller;
class Index extends Controller
{

    public function index()
    {
        return 'index';
    }

    public function sendsms(){
        // 调用示例：
        try{
            $phone = "150988184172";
            $code = rand(100000,999999);
            $result = Sms::sendSms($phone,$code);//::sendSms($phone,$code);
//            print_r($result);die;
        }catch (\Exception $e){

        }
        return json_encode($result);
    }

    public function siwo(){
        return "time：".time();
    }

    public function hello($name = 'ThinkPHP5')
    {
        return 'hello,' . $name;
    }
}
